<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="commons :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页</title>
<!--    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">-->
<!--    <link rel="stylesheet" th:href="@{/css/semantic.min.css}">-->
<!--    <link rel="stylesheet" th:href="@{/css/style.css}">-->
</head>
<body>

    <!--头部导航开始-->
    <!--thymeleaf 片段替换-->
    <div th:replace="commons :: header(1)"></div>
    <!--头部导航结束-->

    <!--中间部分开始-->
    <div class="v-container v-padded-tb-big animated animate__fadeIn">
        <div class="ui container">
            <div class="ui stackable grid">
                <!--左边主体部分开始-->
                <div class="eleven wide column">
                    <!--中间内容头部开始-->
                    <div class="ui top attached segment">
                        <div class="ui middle aligned two column grid">
                            <div class="column">
                                <h3 class="ui teal header">博客</h3>
                            </div>

                            <div class="right aligned column">
                                共 <h2 class="ui orange header v-inline-block v-text-thin" th:text="${page.totalElements}"> 15 </h2> 篇
                            </div>
                        </div>
                    </div>
                    <!--中间内容头部结束-->

                    <!--中间内容部分开始-->
                    <div class="ui attached segment">
                        <div class="ui padded vertical segment v-padded-tb-large" th:each="blog : ${page.content}">
                            <div class="ui middle aligned mobile reversed stackable grid">

                                <div class="eleven wide column">
                                    <h3 class="ui header"><a th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" th:text="${blog.title}" class="v-black">你真的理解什么是财富自由吗？</a></h3>
                                    <!--字符串连接-->
                                    <p class="v-text" th:text="|${blog.description}......|">正确做好任何一件事情的前提是清晰、正确的理解目标。而事实是，我们很多人很多时候根本没有对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已…...</p>

                                    <div class="ui stackable grid">
                                        <div class="eleven wide column">
                                            <div class="ui mini horizontal link list">
                                                <div class="item">
                                                    <img th:src="@{${blog.user.avatar}}" src="https://picsum.photos/id/1027/100/100" alt="头像" class="ui avatar image">
                                                    <div class="content">
                                                        <a th:text="${blog.user.nickname}" href="#" class="header">veo</a>
                                                    </div>
                                                </div>
                                                <div class="item">
                                                    <i class="calendar icon"></i><span th:text="${#dates.format(blog.updatedTime,'yyyy-MM-dd')}">2021-01-25</span>
                                                </div>
                                                <div class="item">
                                                    <i class="eye icon"></i><span th:text="${blog.views}">2345</span>
                                                </div>

                                            </div>
                                        </div>
                                        <div class="right aligned five wide column">
                                            <a href="#" th:href="@{/types/{id}(id=${blog.type.id})}" target="_blank" class="ui teal basic label v-padded-tiny v-text-thin" th:text="${blog.type.name}">认知升级</a>
                                        </div>
                                    </div>
                                </div>

                                <div class="five wide column">
                                    <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                                        <img th:src="@{${blog.firstPicture}}" src="https://picsum.photos/id/1027/800/400" alt="博客图片" class="ui rounded image">
                                    </a>
                                </div>
                            </div>
                        </div>
                        <!--/*-->
                        <div class="ui padded vertical segment v-padded-tb-large">
                            <div class="ui middle aligned mobile reversed stackable grid">

                                <div class="eleven wide column">
                                    <h3 class="ui header">你真的理解什么是财富自由吗？</h3>
                                    <p class="v-text">正确做好任何一件事情的前提是清晰、正确的理解目标。而事实是，我们很多人很多时候根本没有对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已…...</p>

                                    <div class="ui stackable grid">
                                        <div class="eleven wide column">
                                            <div class="ui mini horizontal link list">
                                                <div class="item">
                                                    <img src="https://picsum.photos/id/1027/100/100" alt="头像" class="ui avatar image">
                                                    <div class="content">
                                                        <a href="#" class="header">veo</a>
                                                    </div>
                                                </div>
                                                <div class="item">
                                                    <i class="calendar icon"></i>2021-01-25
                                                </div>
                                                <div class="item">
                                                    <i class="eye icon"></i>2345
                                                </div>

                                            </div>
                                        </div>
                                        <div class="right aligned five wide column">
                                            <a href="#" target="_blank" class="ui teal basic label v-padded-tiny v-text-thin">认知升级</a>
                                        </div>
                                    </div>
                                </div>

                                <div class="five wide column">
                                    <a href="#" target="_blank">
                                        <img src="https://picsum.photos/id/1027/800/400" alt="博客图片" class="ui rounded image">
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="ui padded vertical segment v-padded-tb-large">
                            <div class="ui middle aligned mobile reversed stackable grid">

                                <div class="eleven wide column">
                                    <h3 class="ui header">你真的理解什么是财富自由吗？</h3>
                                    <p class="v-text">正确做好任何一件事情的前提是清晰、正确的理解目标。而事实是，我们很多人很多时候根本没有对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已…...</p>

                                    <div class="ui stackable grid">
                                        <div class="eleven wide column">
                                            <div class="ui mini horizontal link list">
                                                <div class="item">
                                                    <img src="https://picsum.photos/id/1027/100/100" alt="头像" class="ui avatar image">
                                                    <div class="content">
                                                        <a href="#" class="header">veo</a>
                                                    </div>
                                                </div>
                                                <div class="item">
                                                    <i class="calendar icon"></i>2021-01-25
                                                </div>
                                                <div class="item">
                                                    <i class="eye icon"></i>2345
                                                </div>

                                            </div>
                                        </div>
                                        <div class="right aligned five wide column">
                                            <a href="#" target="_blank" class="ui teal basic label v-padded-tiny v-text-thin">认知升级</a>
                                        </div>
                                    </div>
                                </div>

                                <div class="five wide column">
                                    <a href="#" target="_blank">
                                        <img src="https://picsum.photos/id/1027/800/400" alt="博客图片" class="ui rounded image">
                                    </a>
                                </div>
                            </div>
                        </div>
                        <!--*/-->
                    </div>
                    <!--中间内容部分结束-->

                    <!--中间内容底部开始-->
                    <div class="ui bottom attached segment" th:if="${page.totalPages} > 1">
                        <div class="ui middle aligned two column grid">
                            <div class="column">
                                <a th:href="@{/(page=${page.number} - 1)}" th:unless="${page.first}" class="ui mini teal basic button">上一页</a>
                            </div>

                            <div class="right aligned column">
                                <a th:href="@{/(page=${page.number} + 1)}" th:unless="${page.last}" class="ui mini teal basic  button">下一页</a>
                            </div>
                        </div>
                    </div>
                    <!--中间内容底部结束-->

                </div>
                <!--左边主体部分结束-->


                <!--右边侧边导航栏部分开始-->
                <div class="five wide column">
                    <!--分类栏目-->
                    <div class="ui segments">
                        <div class="ui secondary segment">
                            <div class="ui two column grid">
                                <div class="column"><i class="idea icon"></i>分类</div>
                                <div class="right aligned column"><a href="#" th:href="@{/types/-1}" target="_blank">more <i class="angle double right icon"></i></a></div>
                            </div>
                        </div>

                        <div class="ui teal segment">
                            <div class="ui fluid vertical menu">
                                <a href="#" th:href="@{/types/{id}(id=${type.id})}" target="_blank" class="item" th:each="type : ${types}">
                                    <span th:text="${type.name}">学习日志</span>
                                    <div class="ui teal basic left pointing label" th:text="${#arrays.length(type.blogs)}">13</div>
                                </a>
                                <!--/*-->
                                <a href="#" class="item">
                                    思想与感受
                                    <div class="ui teal basic left pointing label">13</div>
                                </a>
                                <a href="#" class="item">
                                    学习日志
                                    <div class="ui teal basic left pointing label">13</div>
                                </a>
                                <a href="#" class="item">
                                    学习日志
                                    <div class="ui teal basic left pointing label">13</div>
                                </a>
                                <a href="#" class="item">
                                    学习日志
                                    <div class="ui teal basic left pointing label">13</div>
                                </a>
                                <a href="#" class="item">
                                    学习日志
                                    <div class="ui teal basic left pointing label">13</div>
                                </a>
                                <!--*/-->
                            </div>
                        </div>
                    </div>

                    <!--标签-->
                    <div class="ui segments v-margin-top-large">
                        <div class="ui secondary segment">
                            <div class="ui two column grid">
                                <div class="column"><i class="tags icon"></i>标签</div>
                                <div class="right aligned column"><a href="#" th:href="@{/tags/-1}" target="_blank">more <i class="angle double right icon"></i></a></div>
                            </div>
                        </div>

                        <div class="ui teal segment">
                            <a href="#" th:href="@{/tags/{id}(id=${tag.id})}" th:each="tag : ${tags}" target="_blank" class="ui teal basic left pointing label v-margin-tb-tiny">
                                <span th:text="${tag.name}">方法论</span><div class="detail" th:text="${#arrays.length(tag.blogs)}">23</div>
                            </a>
                            <!--/*-->
                            <a href="#" target="_blank" class="ui teal basic left pointing label v-margin-tb-tiny">
                                方法论<div class="detail">23</div>
                            </a>
                            <a href="#" target="_blank" class="ui teal basic left pointing label v-margin-tb-tiny">
                                方法论<div class="detail">23</div>
                            </a>
                            <a href="#" target="_blank" class="ui teal basic left pointing label v-margin-tb-tiny">
                                方法论<div class="detail">23</div>
                            </a>
                            <a href="#" target="_blank" class="ui teal basic left pointing label v-margin-tb-tiny">
                                方法论<div class="detail">23</div>
                            </a>
                            <a href="#" target="_blank" class="ui teal basic left pointing label v-margin-tb-tiny">
                                方法论<div class="detail">23</div>
                            </a>
                            <a href="#" target="_blank" class="ui teal basic left pointing label v-margin-tb-tiny">
                                方法论<div class="detail">23</div>
                            </a>
                            <a href="#" target="_blank" class="ui teal basic left pointing label v-margin-tb-tiny">
                                方法论<div class="detail">23</div>
                            </a>
                            <a href="#" target="_blank" class="ui teal basic left pointing label v-margin-tb-tiny">
                                方法论<div class="detail">23</div>
                            </a>
                            <a href="#" target="_blank" class="ui teal basic left pointing label v-margin-tb-tiny">
                                方法论<div class="detail">23</div>
                            </a>
                            <!--*/-->
                        </div>
                    </div>

                    <!--最新推荐栏目-->
                    <div class="ui segments v-margin-top-large">
                        <div class="ui secondary segment">
                            <i class="bookmark icon"></i>最新推荐
                        </div>

                        <div class="ui segment" th:each="blog : ${recommendBlogs}">
                            <a th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="v-black v-text-thin" th:text="${blog.title}">用户故事{User Story}</a>
                        </div>
                        <!--/*-->
                        <div class="ui segment">
                            <a href="#" target="_blank" class="v-black v-text-thin">用户故事{User Story}</a>
                        </div>
                        <div class="ui segment">
                            <a href="#" target="_blank" class="v-black v-text-thin">用户故事{User Story}</a>
                        </div>
                        <div class="ui segment">
                            <a href="#" target="_blank" class="v-black v-text-thin">用户故事{User Story}</a>
                        </div>
                        <div class="ui segment">
                            <a href="#" target="_blank" class="v-black v-text-thin">用户故事{User Story}</a>
                        </div>
                        <div class="ui segment">
                            <a href="#" target="_blank" class="v-black v-text-thin">用户故事{User Story}</a>
                        </div>
                        <div class="ui segment">
                            <a href="#" target="_blank" class="v-black v-text-thin">用户故事{User Story}</a>
                        </div>
                        <div class="ui segment">
                            <a href="#" target="_blank" class="v-black v-text-thin">用户故事{User Story}</a>
                        </div>
                        <!--*/-->
                    </div>


                    <!--二维码-->
                    <h4 class="ui horizontal divider header v-margin-top-large">扫描关注我</h4>
                    <div class="ui centered card" style="width: 11em">
                        <img th:src="@{/images/wechat.jpg}" alt="二维码" class="ui rounded image">
                    </div>

                </div>
                <!--右边侧边导航栏部分结束-->

            </div>
        </div>

    </div>
    <!--中间部分结束-->
    <br>
    <br>

    <!--底部部分开始-->
    <!--thymeleaf 片段替换-->
    <div th:replace="commons :: #footer"></div>
    <!--底部部分结束-->


<!--<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>-->
<!--<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>-->


<!--/*/<th:block th:replace="commons :: script">/*/-->
   <!--thymeleaf 引入js资源，这三行不为注释-->
<!--/*/</th:block>/*/-->

<script>
    $('.menu.toggle').click(function () {
        $('.v-item').toggleClass('v-mobile-hidden')
    })
</script>
</body>
</html>

